package com.ruoyi.web.controller.interview;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.interview.domain.vo.InterviewReportDetailVO;
import com.ruoyi.interview.domain.vo.InterviewReportListVO;
import com.ruoyi.interview.service.IInterviewReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/interview/report")
public class InterviewReportController {

    @Autowired
    private IInterviewReportService interviewReportService;

    @GetMapping("/list/{userId}")
    public AjaxResult list(@PathVariable Long userId){
        List<InterviewReportListVO> list = interviewReportService.selectInterviewReportList(userId);
        return AjaxResult.success(list);
    }

    @GetMapping("/detail")
    public AjaxResult detail(Long id){
        InterviewReportDetailVO report = interviewReportService.selectInterviewReportDetailById(id);
        return AjaxResult.success(report);
    }
}






